// reverse
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// 反转字符串
void reverseString(char *str){
    if(str==NULL){
        printf("Null pointer provided.\n");
        return;
    }
    size_t len = strlen(str);
    for(size_t i=0;i<len/2;i++){
        char temp = str[i];
        str[i] = str[len-1-i];
        str[len-1-i] = temp;
    }
}
int main(){
    char str[] = "Hello,World!";
    printf("Original String: %s\n", str);
    reverseString(str);
    printf("Reversed String: %s\n", str);
    return 0;
}